﻿#include "common.h"

vector<GameMenu> sex_menus{
	{"男", 1},
	{"女", 2},
};

// 创建角色界面
void printCreateCharacterUI() {
	cout << "在开始游戏之前，您需要创建一个角色" << endl << endl;

	string character_name = getLineInput(LineInputConfig{ "请输入名字：", 10, {'='}});

	cout << "输入的名字为：" << character_name << endl;

	cout << endl;

	int sex = getMenuSelectInput({ sex_menus });

	cout << "选择的性别为：" << (sex == 1 ? "男" : "女") << endl;

	Protagonist *protagonist = getProtagonist();

	(*protagonist).name = character_name;
	(*protagonist).sex = sex;

	saveStore();

	cout << "存档成功！" << endl;

	cin.get();

	replaceCurrent("home");
}